string to int java

203

string to int java -

	String number = "10";
	int result = Integer.parseInt(number);			
	System.out.println(result);
Copy

convert a string into an integer -

var text = '42px';
var integer = parseInt(text, 10);
// returns 42

Comments

Submit
0 Comments